package udpInvoker.main;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: esr
 * Date: 08.okt.2008
 * Time: 17:48:12
 * Copyright 2008  Espen Skjervold, FFI
 */
public class InvocationMessage implements Serializable {


    private int type;
    private String methodName;
    private ArrayList<Object> parameters;
    private Object response;
    private long serialNumber;


    public static int INVOCATION=1;
    public static int RESPONSE=2;
    public static int PING=3;
    public static int PONG=4;
    public static int SERVICE_REQUEST = 5;
    public static int SERVICE_RESPONSE = 6;



    public InvocationMessage() {



        parameters= new ArrayList<Object>();
    }

    public void setMethodName(String methodName) {
        this.methodName =methodName;
    }

    public String getMethodName() {
        return methodName;
    }

    public void addParameter(Object parameter) {
        parameters.add(parameter);
    }

    public ArrayList getParameters() {
        return parameters;
    }


    public void setType(int type) {
        this.type=type;
    }

    public int getType() {
        return type;
    }

    public Object getResponse() {
        return response;
    }

    public void setResponse(Object response) {
        this.response = response;
    }

    public long getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(long serialNumber) {
        this.serialNumber = serialNumber;
    }
}
